$max-width: 1440px;
$min-width: 350px;

// Responsive fonts
// https://css-tricks.com/snippets/css/fluid-typography/
@function strip-unit($value) {
  @return $value / ($value * 0 + 1);
}

@mixin fluid-type($min-font-size, $max-font-size) {
  $u1: unit($min-width);
  $u2: unit($max-width);
  $u3: unit($min-font-size);
  $u4: unit($max-font-size);

  @if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
    & {
      font-size: $min-font-size;
      @media screen and (min-width: $min-width) {
        font-size: calc(
          #{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} *
            ((100vw - #{$min-width}) / #{strip-unit($max-width - $min-width)})
        );
      }
      @media screen and (min-width: $max-width) {
        font-size: $max-font-size;
      }
    }
  }
}
